package com.miao.controller
{
	import com.miao.view.DownLoadManagerMediator;
	
	import flash.events.Event;
	
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
	
	public class WindowEventCommand extends SimpleCommand
	{
		
		override public function execute(note:INotification):void{
			var evtType:String = note.getBody() as String;
			
			if(evtType == Event.CLOSING){
				var dlm:DownLoadManagerMediator = facade.retrieveMediator(DownLoadManagerMediator.NAME) as DownLoadManagerMediator;
				dlm.closeWindow();
			}
		}
		
	}
}